summaryrefslogtreecommitdiff
path: root/app/[lng]/evcp/(evcp)/(procurement)/bid-receive/page.tsx
blob: 4f6e9715d3e2d02df40a86e882aed9d588b9d68f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import { Metadata } from 'next'
import { getBiddingsForReceive } from '@/lib/bidding/service'
import { GetBiddingsSchema, searchParamsCache } from '@/lib/bidding/validation'
import { BiddingsReceiveTable } from '@/lib/bidding/receive/biddings-receive-table'

export const metadata: Metadata = {
  title: '입찰서 접수 및 마감',
  description: '입찰서 접수 및 마감 현황을 확인하고 개찰을 진행할 수 있습니다.',
}

interface BiddingReceivePageProps {
  searchParams: Promise<Record<string, string | string[] | undefined>>
}

export default async function BiddingReceivePage({
  searchParams,
}: BiddingReceivePageProps) {
  // URL 파라미터 검증
  const searchParamsResolved = await searchParams
  const search = searchParamsCache.parse(searchParamsResolved)

  // 데이터 조회
  const biddingsPromise = getBiddingsForReceive(search)

  return (
    <div className="flex flex-col gap-4 p-4">
      <div className="flex items-center justify-between">
        <div>
          <h1 className="text-2xl font-bold tracking-tight">입찰서 접수 및 마감</h1>
          <p className="text-muted-foreground">
            입찰서 접수 현황을 확인하고 개찰을 진행할 수 있습니다.
          </p>
        </div>
      </div>

      <BiddingsReceiveTable promises={Promise.all([biddingsPromise])} />
    </div>
  )
}